package com.rightsidetech.trade.mapper;

import com.rightsidetech.trade.dtos.request.integral.IntegralOperateRecordReq;
import com.rightsidetech.trade.dtos.response.integral.IntegralConvertRecordResp;
import com.rightsidetech.trade.dtos.response.integral.IntegralOperateRecordResp;
import com.rightsidetech.trade.dtos.response.integral.IntegralOrderDetailResp;
import com.rightsidetech.trade.entity.TdIntegralOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TdIntegralOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TdIntegralOrder record);

    int insertSelective(TdIntegralOrder record);

    TdIntegralOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TdIntegralOrder record);

    int updateByPrimaryKey(TdIntegralOrder record);

    List<IntegralConvertRecordResp> selectAppPageList(Long storeId);

    IntegralOrderDetailResp selectDetail(@Param("id") Long id,@Param("orderNo") String orderNo);

    List<IntegralOperateRecordResp> selectOperateRecordPage(IntegralOperateRecordReq req);

    Integer selectCountByStoreIdAndStatus(@Param("storeInfoId") Long storeInfoId,@Param("status") Byte status);

    TdIntegralOrder selectOrderByOrderNo(@Param("orderNo") String orderNo);
}